

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=&#34;auto&#34;>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/ttntt.gitee.io/img/logo.png">
  <link rel="icon" type="image/png" href="/ttntt.gitee.io/img/logo.png">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="一个不甘做程序员的后端程序员">
  <meta name="author" content="nigntbird">
  <meta name="keywords" content="">
  <title>使用IDEA搭建jdk源码阅读环境 - nigntbird 的个人博客</title>

  <link  rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.staticfile.org/github-markdown-css/4.0.0/github-markdown.min.css" />
  <link  rel="stylesheet" href="/ttntt.gitee.io/lib/hint/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/10.0.0/styles/github-gist.min.css" />
    
  

  


<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_pf9vaxs7x7b.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/ttntt.gitee.io/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script  src="/ttntt.gitee.io/js/utils.js" ></script>
  <script  src="/ttntt.gitee.io/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.2.0"></head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/ttntt.gitee.io/">&nbsp;<strong>nigntbird 的个人博客</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/ttntt.gitee.io/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/ttntt.gitee.io/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/ttntt.gitee.io/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/ttntt.gitee.io/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/ttntt.gitee.io/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;</a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" href="javascript:">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner intro-2" id="background" parallax=true
         style="background: url('/ttntt.gitee.io/img/bg/post_bg.jpg') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="container page-header text-center fade-in-up">
            <span class="h2" id="subtitle">
              
            </span>

            
              <div class="mt-3">
  
    <span class="post-meta mr-2">
      <i class="iconfont icon-author" aria-hidden="true"></i>
      nigntbird
    </span>
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2020-11-25 21:15" pubdate>
        2020年11月25日 晚上
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      487 字
    </span>
  

  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      阅读了 
      5
       分钟
    </span>
  

  
  
    
      <!-- 不蒜子统计文章PV -->
      <span id="busuanzi_container_page_pv" style="display: none">
        <i class="iconfont icon-eye" aria-hidden="true"></i>
        <span id="busuanzi_value_page_pv"></span> 次
      </span>
    
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid">
  <div class="row">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-md">
      <div class="container nopadding-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto" id="post">
            <!-- SEO header -->
            <h1 style="display: none">使用IDEA搭建jdk源码阅读环境</h1>
            
              <p class="note note-info">
                
                  本文最后更新于：3 分钟前
                
              </p>
            
            <div class="markdown-body" id="post-body">
              <h3 id="找到源码位置"><a href="#找到源码位置" class="headerlink" title="找到源码位置"></a>找到源码位置</h3><p>在安装JDK的位置找到src.zip和javafx-src.zip，解压</p>
<p>如果忘了，可以在IDEA中找到目录(Projuect Structure)</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200325213907.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326183101.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<h3 id="IDEA搭建"><a href="#IDEA搭建" class="headerlink" title="IDEA搭建"></a>IDEA搭建</h3><h4 id="第一步：新建项目"><a href="#第一步：新建项目" class="headerlink" title="第一步：新建项目"></a>第一步：新建项目</h4><p>打开IDEA，按如下步骤新建一个简单Java项目，也可以是maven等项目</p>
<p>create new project</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326183843.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p>新建一个简单Java项目</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326184351.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p>点击finish后，项目就创建好了</p>
<h4 id="第二步：添加源码"><a href="#第二步：添加源码" class="headerlink" title="第二步：添加源码"></a>第二步：添加源码</h4><p>将之前解压的src.zip复制到工程目录下</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326185106.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<h4 id="第三步：替换JDK关联"><a href="#第三步：替换JDK关联" class="headerlink" title="第三步：替换JDK关联"></a>第三步：替换JDK关联</h4><p>为了能够备注以及避免修改到其他项目所使用的内容，添加一个名为“JavaJDK1.8Funyard”的SDK</p>
<p>并将Sourcepath修改为当前项目src下的源码内容</p>
<p><strong>移除Sourcepath中关联的src.zip</strong></p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326185950.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p>将项目中的JDK源码关联到Sourcepath</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326190449.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326190432.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p>修改项目使用的JDK为上面新建的</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326190945.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<h4 id="第四步：解决系统资源不足-OutOfMemoryError"><a href="#第四步：解决系统资源不足-OutOfMemoryError" class="headerlink" title="第四步：解决系统资源不足(OutOfMemoryError)"></a>第四步：解决系统资源不足(OutOfMemoryError)</h4><p>依次点击File–&gt;Settings–&gt;Build,Execution,Deployment–&gt;Compiler</p>
<p>堆大小可由原来的700改为1700</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326191409.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<h4 id="第五步：解决com-sun-tools-javac-api不存在"><a href="#第五步：解决com-sun-tools-javac-api不存在" class="headerlink" title="第五步：解决com.sun.tools.javac.api不存在"></a>第五步：解决com.sun.tools.javac.api不存在</h4><p>将jdk安装目录下(不是自己新建的这个源码阅读工程)lib包添加到项目中</p>
<p>依然是Projuect Structure</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200325213907.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326192128.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326192520.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p>点击ok，完成</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326192924.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<h4 id="第六步：解决找不到sun-awt-UNIXToolkit和sun-font-FontConfigManager"><a href="#第六步：解决找不到sun-awt-UNIXToolkit和sun-font-FontConfigManager" class="headerlink" title="第六步：解决找不到sun.awt.UNIXToolkit和sun.font.FontConfigManager"></a>第六步：解决找不到sun.awt.UNIXToolkit和sun.font.FontConfigManager</h4><p>在项目中新建sun.awt包和sun.font包，分别新建UNIXToolkit.java和FontConfigManager.java</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326193413.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p>到<a target="_blank" rel="noopener" href="http://openjdk.java.net/">OpenJDK</a>寻找<a target="_blank" rel="noopener" href="http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/e17fe591a374/src/solaris/classes/sun/awt/UNIXToolkit.java">sun.awt.UNIXToolkit</a>和<a target="_blank" rel="noopener" href="http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/e17fe591a374/src/solaris/classes/sun/font/FontConfigManager.java">sun.font.FontConfigManager</a>的源码，分别复制到上面新建的两个类里</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326193602.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p>选择对应版本jdk</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326194120.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326194349.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p>寻找UNIXToolkit类</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326194507.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326195208.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p>进入到 /src/solaris/classes/sun/awt/目录，找到UNIXToolkit</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326195427.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p>FontConfigManager也是一样，路径：<code>src/solaris/classes/sun/font/FontConfigManager.java</code></p>
<p>复制进去之后可以看到还是有错误的地方，这时候就要进行清理idea缓存然后重启：</p>
<p>点击左上角File-&gt;Invalidate Caches/Restart…</p>
<p><img src="/ttntt.gitee.io/img/images/%E4%BD%BF%E7%94%A8IDEA%E6%90%AD%E5%BB%BAjdk%E6%BA%90%E7%A0%81%E9%98%85%E8%AF%BB%E7%8E%AF%E5%A2%83/20200326201036.png" srcset="/ttntt.gitee.io/img/loading.gif"></p>
<p>重启之后就可以顺利运行啦*(上面新建的类中可能还会报error，但是对使用没有影响)*</p>
<p>写好测试类，打好断点，右键debug，F7F7F7F7F7F7一直F7，爽到</p>

            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                
              </div>
              
                <p class="note note-warning">本博客所有文章除特别声明外，均采用 <a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！</p>
              
              
                <div class="post-prevnext row">
                  <article class="post-prev col-6">
                    
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/ttntt.gitee.io/2020/11/06/basic/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9B%B8%E5%85%B3/">
                        <span class="hidden-mobile">操作系统相关</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
              <!-- Comments -->
              <article class="comments" id="comments">
                
                
  <div id="vcomments"></div>
  <script type="text/javascript">
    function loadValine() {
      addScript('https://cdn.staticfile.org/valine/1.4.14/Valine.min.js', function () {
        new Valine({
          el: "#vcomments",
          app_id: "KlkvDALnR8PRdMQXRDN6iqNu-gzGzoHsz",
          app_key: "xec8mdMRTtI5Hy9fBBjHHoyP",
          placeholder: "说点什么吧",
          path: window.location.pathname,
          avatar: "retro",
          meta: ["nick","mail","link"],
          pageSize: "20",
          lang: "zh-CN",
          highlight: false,
          recordIP: false,
          serverURLs: "",
        });
      });
    }
    waitElementVisible('vcomments', loadValine);
  </script>
  <noscript>Please enable JavaScript to view the <a target="_blank" href="https://valine.js.org" rel="nofollow noopener noopener">comments
      powered by Valine.</a></noscript>


              </article>
            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div id="tocbot"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    
  </main>

  
    <a id="scroll-top-button" href="#" role="button">
      <i class="iconfont icon-arrowup" aria-hidden="true"></i>
    </a>
  

  
    <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
  

  

  

  <footer class="mt-5">
  <div class="text-center py-3">
    <div>
      <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a>
      <i class="iconfont icon-love"></i>
      <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener">
        <span>Fluid</span></a>
    </div>
    
  <div class="statistics">
    
    

    
      
        <!-- 不蒜子统计PV -->
        <span id="busuanzi_container_site_pv" style="display: none">
            总访问量 
            <span id="busuanzi_value_site_pv"></span>
             次
          </span>
      
      
        <!-- 不蒜子统计UV -->
        <span id="busuanzi_container_site_uv" style="display: none">
            总访客数 
            <span id="busuanzi_value_site_uv"></span>
             人
          </span>
      
    
  </div>


    

    
  </div>
</footer>

<!-- SCRIPTS -->
<script  src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js" ></script>
<script  src="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/js/bootstrap.min.js" ></script>
<script  src="/ttntt.gitee.io/js/debouncer.js" ></script>
<script  src="/ttntt.gitee.io/js/main.js" ></script>

<!-- Plugins -->


  
    <script  src="/ttntt.gitee.io/js/lazyload.js" ></script>
  



  



  <script defer src="https://cdn.staticfile.org/clipboard.js/2.0.6/clipboard.min.js" ></script>
  <script  src="/ttntt.gitee.io/js/clipboard-use.js" ></script>



  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>





  <script  src="https://cdn.staticfile.org/tocbot/4.11.1/tocbot.min.js" ></script>
  <script>
    $(document).ready(function () {
      var boardCtn = $('#board-ctn');
      var boardTop = boardCtn.offset().top;

      tocbot.init({
        tocSelector: '#tocbot',
        contentSelector: '#post-body',
        headingSelector: 'h1,h2,h3,h4,h5,h6',
        linkClass: 'tocbot-link',
        activeLinkClass: 'tocbot-active-link',
        listClass: 'tocbot-list',
        isCollapsedClass: 'tocbot-is-collapsed',
        collapsibleClass: 'tocbot-is-collapsible',
        collapseDepth: 0,
        scrollSmooth: true,
        headingsOffset: -boardTop
      });
      if ($('.toc-list-item').length > 0) {
        $('#toc').css('visibility', 'visible');
      }
    });
  </script>



  <script  src="https://cdn.staticfile.org/typed.js/2.0.11/typed.min.js" ></script>
  <script>
    var typed = new Typed('#subtitle', {
      strings: [
        '  ',
        "使用IDEA搭建jdk源码阅读环境&nbsp;",
      ],
      cursorChar: "_",
      typeSpeed: 70,
      loop: false,
    });
    typed.stop();
    $(document).ready(function () {
      $(".typed-cursor").addClass("h2");
      typed.start();
    });
  </script>



  <script  src="https://cdn.staticfile.org/anchor-js/4.2.2/anchor.min.js" ></script>
  <script>
    anchors.options = {
      placement: "left",
      visible: "hover",
      
      icon: "❡"
      
    };
    var el = "h1,h2,h3,h4,h5,h6".split(",");
    var res = [];
    for (item of el) {
      res.push(".markdown-body > " + item)
    }
    anchors.add(res.join(", "))
  </script>



  <script  src="/ttntt.gitee.io/js/local-search.js" ></script>
  <script>
    var path = "/ttntt.gitee.io/local-search.xml";
    var inputArea = document.querySelector("#local-search-input");
    inputArea.onclick = function () {
      searchFunc(path, 'local-search-input', 'local-search-result');
      this.onclick = null
    }
  </script>



  <script  src="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.css" />

  <script>
    $('#post img:not(.no-zoom img, img[no-zoom]), img[zoom]').each(
      function () {
        var element = document.createElement('a');
        $(element).attr('data-fancybox', 'images');
        $(element).attr('href', $(this).attr('src'));
        $(this).wrap(element);
      }
    );
  </script>







  
  
    <script>
      !function (e, t, a) {
        function r() {
          for (var e = 0; e < s.length; e++) s[e].alpha <= 0 ? (t.body.removeChild(s[e].el), s.splice(e, 1)) : (s[e].y--, s[e].scale += .004, s[e].alpha -= .013, s[e].el.style.cssText = "left:" + s[e].x + "px;top:" + s[e].y + "px;opacity:" + s[e].alpha + ";transform:scale(" + s[e].scale + "," + s[e].scale + ") rotate(45deg);background:" + s[e].color + ";z-index:99999");
          requestAnimationFrame(r)
        }

        function n() {
          var t = "function" == typeof e.onclick && e.onclick;
          e.onclick = function (e) {
            t && t(), o(e)
          }
        }

        function o(e) {
          var a = t.createElement("div");
          a.className = "heart", s.push({
            el: a,
            x: e.clientX - 5,
            y: e.clientY - 5,
            scale: 1,
            alpha: 1,
            color: c()
          }), t.body.appendChild(a)
        }

        function i(e) {
          var a = t.createElement("style");
          a.type = "text/css";
          try {
            a.appendChild(t.createTextNode(e))
          } catch (t) {
            a.styleSheet.cssText = e
          }
          t.getElementsByTagName("head")[0].appendChild(a)
        }

        function c() {
          return "rgb(" + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + ")"
        }

        var s = [];
        e.requestAnimationFrame = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || function (e) {
          setTimeout(e, 1e3 / 60)
        }, i(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"), n(), r()
      }(window, document);
    </script>
  











  
    <!-- Baidu Analytics -->
    <script defer>
      var _hmt = _hmt || [];
      (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?68846803d2c2c84a8b0f73b87244ddef";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
  

  

  

  

  

  





</body>
</html>
